package com.forever7776.life.core.entity.blog;

import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

import java.io.Serializable;

/**
 * <p>
 * 博客类型表
 * </p>
 *
 * @author kz
 * @since 2018-02-10
 */
@TableName("blog_type")
public class BlogType extends Model<BlogType> {

    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.INPUT)
    private String id;
    /**
     * 博客类型名称(如：情感，技术，工作，生活。。。。)
     */
    private String name;
    /**
     * 博客类型icon链接
     */
    private String icon;
    /**
     * 是否删除（0：是，1否）
     */
    private Integer status;
    /**
     * 排序
     */
    private Integer sort;
    /**
     * 父级url的id
     */
    @TableField("parent_id")
    private String parentId;
    @TableField("insert_date")
    private Date insertDate;
    @TableField("last_date")
    private Date lastDate;


    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public Date getInsertDate() {
        return insertDate;
    }

    public void setInsertDate(Date insertDate) {
        this.insertDate = insertDate;
    }

    public Date getLastDate() {
        return lastDate;
    }

    public void setLastDate(Date lastDate) {
        this.lastDate = lastDate;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "BlogType{" +
        ", id=" + id +
        ", name=" + name +
        ", icon=" + icon +
        ", status=" + status +
        ", sort=" + sort +
        ", parentId=" + parentId +
        ", insertDate=" + insertDate +
        ", lastDate=" + lastDate +
        "}";
    }
}
